package StudyCode.summary.Basic.console;

import java.util.Scanner;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class Exit {
	public static void main(String[] args) {
		String input;
		Scanner scanner = new Scanner(System.in);
		while (true) {
			System.out.print("是否退出程序?" + " (Y or N)");
			input = scanner.next();
			if (input.equalsIgnoreCase("Y"))
				System.exit(1);
		}
	}
}
